<!-- <template>
	<view>

	</view>
</template>

<script>
	import {
		member_log_get_list
	} from '@/api/member.js'
	export default {
		data() {
			return {
				openid: ''
			};
		},
		onLoad() {
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data;
					this.member_log_get_listFun();
				},
				fail: () => {
					uni.reLaunch({
						url: '/pages/login/login'
					});
				}
			});
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">

</style> -->



<template>
	<view class="withdraw_deposit_record" :class='equipment'>
		<view class="withdraw_deposit_record_box">
			<view class="withdraw_deposit_record_box_item" v-for="(item,index) in res.list" :key="index">
				<view class="withdraw_deposit_record_box_item_">
					<view class="withdraw_deposit_record_box_item_left">
						提现单号
					</view>
					<view class="withdraw_deposit_record_box_item_right">
						{{item.logno}}
					</view>
				</view>
				<view class="withdraw_deposit_record_box_item_">
					<view class="withdraw_deposit_record_box_item_left">
						提现类型
					</view>
					<view class="withdraw_deposit_record_box_item_right">
						{{item.typestr}}
					</view>
				</view>
				<view class="withdraw_deposit_record_box_item_">
					<view class="withdraw_deposit_record_box_item_left">
						状态
					</view>
					<view class="withdraw_deposit_record_box_item_right">
						{{item.status === '-1'?'失败':item.status === '0'?'申请中':'成功'}}
					</view>
				</view>
				<view class="withdraw_deposit_record_box_item_">
					<view class="withdraw_deposit_record_box_item_left">
						实际金额
					</view>
					<view class="withdraw_deposit_record_box_item_right">
						{{item.realmoney}}
					</view>
				</view>
				<view class="withdraw_deposit_record_box_item_">
					<view class="withdraw_deposit_record_box_item_left">
						申请时间
					</view>
					<view class="withdraw_deposit_record_box_item_right">
						{{item.createtime}}
					</view>
				</view>
				<view class="withdraw_deposit_record_box_item_" v-if='item.status === "-1"'>
					<view class="withdraw_deposit_record_box_item_left">
						驳回理由
					</view>
					<view class="withdraw_deposit_record_box_item_right" style="color: red;">
						{{item.remark}}
					</view>
				</view>
			</view>
		</view>
		<uni-pagination class="withdraw_deposit_record_pagination" :show-icon="true" :total="res.total"
			@change='paginationChange' />

	</view>
</template>

<script>
	import {
		member_log_get_list
	} from '@/api/member.js'
	export default {
		data() {
			return {
				openid: '',
				list: '',
				page: 1,
				res: '',
				equipment: ''
			}
		},
		onLoad() {
			if (process.env.UNI_PLATFORM === 'h5') {
				// 在H5环境中打开
				console.log('在H5环境中打开');
				this.equipment = 'H5'
			} else if (process.env.UNI_PLATFORM === 'app-plus') {
				// 在App环境中打开
				console.log('在App环境中打开');
				this.equipment = 'App'
			}
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data
					this.member_log_get_listFun();
				},
				fail: () => {
					uni.navigateTo({
						url: '/pages/login/login'
					});
				}
			});
		},
		methods: {

			paginationChange(e) {
				this.page = e.current;
				this.member_log_get_listFun();
			},
			async member_log_get_listFun() {
				let up = {
					openid: this.openid,
					type: 1,
					page: this.page
				}
				let data = await member_log_get_list(up);
				this.res = data.result;
				console.log(this.res);
			}
		}
	}
</script>

<style lang="scss">
	.App {
		min-height: 100vh;
	}

	.H5 {
		min-height: calc(100vh - 88rpx);
	}

	.withdraw_deposit_record {
		width: 100%;
		background-color: #f0f0f0;

		.withdraw_deposit_record_box {
			width: 100%;
			padding: 30rpx 20rpx 80rpx 20rpx;

			.withdraw_deposit_record_box_item {
				width: 100%;
				background-color: #fff;
				margin: 30rpx 0;
				border-radius: 10rpx;

				.withdraw_deposit_record_box_item_ {
					width: 100%;
					padding: 10rpx 40rpx;
					display: flex;
					justify-content: space-between;
					font-size: 26rpx;
				}
			}
		}

		.withdraw_deposit_record_pagination {
			width: 100%;
			height: 80rpx;
			position: fixed;
			bottom: 0;
			background-color: #f0f0f0;
		}
	}
</style>